package com.drs.challenge.bean;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import javax.validation.constraints.NotNull;

import java.io.Serializable;

import java.time.LocalDateTime;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

/**
 * 音频
 * @Date 2023-07-06 10:04:41
 * @author Jasmine-drs
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("audio")
@ApiModel(value="Audio对象", description="音频")
public class Audio implements Serializable {

    @NotBlank(message="[索引]不能为空")
    @Size(max= 32,message="编码长度不能超过32")
    @ApiModelProperty("索引")
    private String id;

    @NotNull(message="[0 未录音，1 已录音]不能为空")
    @ApiModelProperty("0 未录音，1 已录音")
    private Integer status;

    @NotNull(message="[创建时间]不能为空")
    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @NotNull(message="[更新时间]不能为空")
    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @NotNull(message="[二维码二进制]不能为空")
    @ApiModelProperty("二维码二进制")
    private byte[] qr;

    @ApiModelProperty("音频二进制")
    private byte[] audio;

}
